import api from '@/utils/http.js'

export const adminInsertOne = async (data) => {
    return await api.post('/insertAdmin', data)
}

export const adminSelectPage = async (data) => {
    return await api.get('/selectAdmin/page', { params: data })
}

export const adminSelectOne = async (id) => {
    return await api.get('/getAdminInfo/' + id)
}

export const adminUpdateOne = async (data) => {
    return await api.put('/updateAdmin', data)
}

export const adminDeleteOne = async (id) => {
    return await api.delete('/deleteAdmin/' + id)
}

export const adminLogin = async (data) => {
    return await api.post('/login', data)
}
